<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>全局变量基础用法</title>
</head>

<body>
    <div class="cssone">简简单单的快乐</div>
    <style>
        :root {
            --main-color: #f40;
            --block-font-size: 10px;
        }

        .cssone {
            background-color: rgb(239, 223, 226);
            color: var(--main-color);
        }
    </style>
</body>

</html>